Skip to content

Fix inc task duration on skipped tasks - #58588

Closed
steveahnahn wants to merge 4 commits into
apache:mainfrom
steveahnahn:fix-inc-task-duration-skipped-tasks
Closed

steveahnahn wants to merge 4 commits into
apache:mainfrom
steveahnahn:fix-inc-task-duration-skipped-tasks

Conversation

@steveahnahn

Copy link
Copy Markdown
Contributor

Problem

When a Dag times out due to dagrun_timeout, unfinished task instances are marked as SKIPPED. However, their end_date remains null, causing the task duration to continuously increase in the UI as it's calculated as current_time - start_date.

Solution

Since SKIPPED is a finished state (State.finished includes SKIPPED), change includes the set_state() method so it properly sets these fields as direct assignment skips this logic.

Related Issues

Possible followup:

@potiuk potiuk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. But likely others who know more about the state updates should chime in.

@steveahnahn

Copy link
Copy Markdown
Contributor Author

tagging @ashb and @XD-DENG as it was a recommended reviewer, but open to anyone

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.

@github-actions github-actions Bot added the stale Stale PRs per the .github/workflows/stale.yml policy file label Feb 26, 2026
@steveahnahn steveahnahn closed this Mar 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:scheduler stale Stale PRs per the .github/workflows/stale.yml policy file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Task duration keeps increasing for skipped tasks due to DAG timeout

2 participants